package com.t216.dm216.controller;

import com.t216.dm216.common.PageUtil;
import com.t216.dm216.common.Result;
import com.t216.dm216.pojo.dto.DmSchedulerSearchDTO;
import com.t216.dm216.pojo.dto.SearchParamDTO;
import com.t216.dm216.service.DmSchedulerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/search/api")
public class SearchController {
    @Resource
    private DmSchedulerService dmSchedulerService;
    @PostMapping("/p/list/queryItemList")
    public Result<PageUtil<DmSchedulerSearchDTO>> queryItemList(@RequestBody SearchParamDTO searchParamDTO){
        return Result.success(dmSchedulerService.getSearchItem(searchParamDTO));
    }
}
